<?php
include_once("../Functions/connectDatabase.php");
get_connection();

$password = md5(md5("admin"));


$sql = "INSERT INTO users (user_id,user_name,user_password,user_sex,user_type,user_email)
VALUES ('admin', 'admin', '$password','保密','管理员',' ')";


if (mysqli_query($conn, $sql)) {
    echo "<script>alert('初始化成功！');window.location.href='./index.php'</script>";
} else {
    $error = mysqli_error($conn);
    $error = str_replace('\'', '', $error);
    echo "<script>alert('初始化失败！$error');</script>";
}

close_connection();
?>